
#ifndef LUAJAVA_LOG_H
#define LUAJAVA_LOG_H

#ifdef __ANDROID__
#include <android/log.h>
#define LOG_TAG  "LUA-JAVA"
#define LOG(level, ...) __android_log_print(level, LOG_TAG, __VA_ARGS__)
#define LOGI(...) LOG(ANDROID_LOG_INFO, __VA_ARGS__)
#define LOGE(...) LOG(ANDROID_LOG_ERROR, __VA_ARGS__)
#define LOGD(...) LOG(ANDROID_LOG_DEBUG, __VA_ARGS__)

#else
#define LOGI(...) printf(__VA_ARGS__)
#define LOGE(...) printf(stderr, #__VA_ARGS__)
#define LOGD LOGI

#endif

#define TYPENAME(L, top)  lua_typename(L, lua_type(L, top))

#endif

